package com.nine.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.nine.entity.RolePermission;

public interface RolePermissionMapper {
	
	/**
	 * 批量添加角色权限
	 * @param rolePermission	角色权限的集合
	 * @return	影响的行数
	 */
	public Integer insertMore(List<RolePermission> rolePermission);
	
	/**
	 * 批量删除角色权限
	 * @param permissionId
	 * @param roleId
	 * @return
	 */
	public Integer delMoreRolePermission(@Param("array") Integer[] permissionId, @Param("roleId") Integer roleId);
	
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table role_permission
     *
     * @mbggenerated Mon Sep 17 10:56:39 CST 2018
     */
    int deleteByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table role_permission
     *
     * @mbggenerated Mon Sep 17 10:56:39 CST 2018
     */
    int insert(RolePermission record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table role_permission
     *
     * @mbggenerated Mon Sep 17 10:56:39 CST 2018
     */
    int insertSelective(RolePermission record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table role_permission
     *
     * @mbggenerated Mon Sep 17 10:56:39 CST 2018
     */
    RolePermission selectByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table role_permission
     *
     * @mbggenerated Mon Sep 17 10:56:39 CST 2018
     */
    int updateByPrimaryKeySelective(RolePermission record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table role_permission
     *
     * @mbggenerated Mon Sep 17 10:56:39 CST 2018
     */
    int updateByPrimaryKey(RolePermission record);
}